﻿using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
using System.Diagnostics;
using System.ComponentModel;
using WPFExcelReport.Helpers;
using System.Windows.Input;
namespace WPFExcelReport
{
    public partial class TBS03
    {
        public TBS03()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VBSSATZ();
            this.DataContext = MV;
            InitializeComponent();
        }
        public override void LOADBYAUF()
        {
            base.LOADBYAUF();
            if (ORDERNUM.Length < 20)
                return;
            if (!IsAuto)
                return;
            if (Counts > 0)
                return;
            PM["ART"] = ORDERNUM.Substring(1, 20);             
            TMV.CREATEBYART(PM);
            vwMaster.View.MoveCurrentToFirst();
        } 
        public override void OnWTKEYChg()
        {
            if (!IsEdit)
                return;
            if (dwMaster == null)
                return;
            TMV.BSSRFNR = WTKEY;
            base.OnWTKEYChg();
        }
       
    }
}
